package old_go_learn

import (
	"time"
	"fmt"
)

func main(){
	<-time.After(2*time.Second)
	fmt.Println("时间到")
}

func main02(){
	time.Sleep(2*time.Second)
	fmt.Println("时间到")
}

func main01(){
	//延时2s后打印一句话
	timer := time.NewTimer(2*time.Second)

	<-timer.C
	fmt.Println("时间到")
}
